//
//  AppDelegate+RootController.m
//  XKJY
//
//  Created by 小康100 on 2017/3/8.
//  Copyright © 2017年 xiaokang100. All rights reserved.
//

#import "AppDelegate+RootController.h"
#import "XKLoginViewController.h"
#import "XKMainTabBarController.h"
#import "XKMainNavigationController.h"

@implementation AppDelegate (RootController)

- (void)setRootViewController {
    
    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    
//    if ([[NSUserDefaults standardUserDefaults] boolForKey:@"isRemberPassword"] && [[NSUserDefaults standardUserDefaults] boolForKey:@"isLoginSuccess"]) {
//        XKMainTabBarController *tabBar = [[XKMainTabBarController alloc] init];
//        self.window.rootViewController = tabBar;
//    } else {
        XKLoginViewController *loginVC = [[XKLoginViewController alloc] init];
        XKMainNavigationController *nav = [[XKMainNavigationController alloc] initWithRootViewController:loginVC];
        self.window.rootViewController = nav;
//    }
    self.window.backgroundColor = kBaseRedColor;
    [self.window makeKeyAndVisible];
}

@end
